<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    let A = function() {
        this.myname = 'yanle';
        this.age = 25;
        this.getName = function () {
            console.log(this.myname);
        }
    };

    A.prototype.local = '成都';
    let a = new A();
    console.log(a);
    a.getName();
    console.log(a.age);
</script>
</body>
</html>
